﻿<UserControl x:Class="Ascend.SceneViewer3D"
             x:Name="me"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:loc="clr-namespace:Ascend"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

	<UserControl.Style>
		<Style TargetType="{x:Type UserControl}">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type UserControl}">
						<Border Background="{TemplateBinding Background}">
							<Viewport3D Camera="{Binding Scene.Camera, ElementName=me}">
								<ModelVisual3D Content="{Binding Scene.RenderRoot.Data, ElementName=me}"/>
							</Viewport3D>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Style>

</UserControl>
